EMT Practice Test

1. Question Content...


Question List

Question1: What is the difference between online and offline shipping methods?

Question2: You are working on a Magento store which will be selling in two countries. Each country has its own set of payment methods.
How do you organize the project to support this requirement?

Question3: You are reviewing a theme in app/design/frontend/MyCompany/MyTheme and see the file etc/view.xml.
What is the function of this file?

Question4: You are implementing a before plugin in MyCompany_Magic. It will intercept the same method that MyCompany_Admission is already intercepting using a before plugin: Topmenu::getBlockHtml
Which two actions are required to ensure the new plugin will execute last? (Choose two.)

Question5: A custom module must make changes to the schema following each setup:upgrade run.
This must be done after all other module's schema updates have been applied.
How is this accomplished?

Question6: During a code review of a module MyCompany_PaymentCurrencies you see a configuration field declared in the file etc/adminhtml/system.xml:

What is the consequence of the attribute showInStore being set to 0?

Question7: A Magento industry partner shipping provider has tasked you to build their integration module called MyCompany_ShippingProvider.
Where do you define the class that provides options for the select field that enables or disables the provider in the file etc/adminhtml/system.xml?

Question8: You added a plugin declaration to MyCompany/MyModule/etc/di.xml:

What will be the effect of this declaration?

Question9: You are reviewing a Magento module and see a directory named Service.
What can you determine from this directory's name?

Question10: Assume that a customer's cart only includes one downloadable product.
What effect will it cause on the quote object?

Question11: A merchant tasks you to keep sales managers out of the system configuration backend pages.
How do you do that using the admin interface?

Question12: You have loaded an instance of Magento\Catalog\Model\Product in the $product variable. You know that the loaded product has the type configurable with four variations. These variations have the prices: $10, $12, $12, $15.
What will be the result of the $product->getFinalPrice() call?

Question13: You have created a module controller that responds to the following URL:
/mycompany/product/load/id/123.
Which two methods will load the product model by ID as specified in the URL? (Choose two.)

Question14: How can you render a text on a page using only layout xml?

Question15: While integrating a merchant's product information management system with Magento, you create a module MyCompany_MerchantPim that adds a catalog product EAV attribute pim_entity_id programmatically. In which type of setup script do you create the EAV attribute?

Question16: You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML.
What is the correct layout declaration for this?

Question17: How can you access the select query of a collection?

Question18: You are updating a module to add extra functionality to the Magento application, Where would Magento look for modules?

Question19: You need to add a new column to the sales_shipment and the sales_shipment_grid tables. Other than utilizing the default addColumn methods, what way is automatic?

Question20: Magento allows you to specify custom values per store for product attributes created in the admin panel.
Which architectural pattern makes it possible?

Question21: Magento and third-party developers can find it difficult to track and report the dependencies that customized extensions have on other extensions. To address these issues, the Magento system introduces service contracts.
What is a Service Contracts - Data interfaces?

Question22: A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or more billing addresses.
How is this implemented?

Question23: What are two functions of a resource model? (Choose two.)

Question24: You are implementing a customization of the sales management within a module MyCompany_MySalesProcess. You have created several event observers to add the custom functionality. Each observer is a separate class, but they require some common functionality.
How do you implement the common functionality in the event observers, keeping maintainability and testability in mind?

Question25: What happens when a category's is_anchor attribute is set to 1?

Question26: A merchant requires the ability to configure contact information for their brick and mortar stores as a CSV file upload. The module already exists and contains an etc/adminhtml/system.xml file where the new field can be added.
How do you specify the class that will process the uploaded file?

Question27: The module MyCompany_MyModule will add a new page in the admin interface to display a custom entity in a grid.
You created a controller for this grid \MyCompany\MyModule\Controller\Adminhtml\CustomEntity\Index
Which two actions are required to make the new page accessible at the https://your.store.base.url/admin/my_module/custom_entity URL? (Choose two.)

Question28: The module MyCompany_MyModule will add a new page to the admin interface at the URL path admin/mycompany/entity_grid.
How do you name the file containing the action controller class so the admin router matches the path to the class?

Question29: You are working on a jewelry store that sells rings. Each ring allows an adjustment in size. The customer specifies finger size in inches and the merchant physically adjusts the stocked ring to the required size.
How is this represented in Magento?

Question30: You need to add the Google Tag Manager (GTM) to every page.
What three steps do you take to accomplish this in MyCompany_MyModule?

Question31: You are working on a new entity called vendor. You implemented the model, resource model and collection. You want to ensure that standard model events will be fired for your model, so an observer can be created for the events vendor_save_after, vendor_save_commit_after and others.
How do you do that?

Question32: You are adding a child node to the product.info block using the XML:

How will this block be rendered?

Question33: Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/{ID}
How is this one?

Question34: You need to render a product attribute's raw value as a variable in a script tag. This value
will be used to initialize an application on the frontend.
How do you render this value?

Question35: While reviewing a layout file named sales_order_view.xml you notice the element <update handle="customer_account"/>
What is the purpose of this element?

Question36: You are adding a new entry to the backend menu that appears after
Marketing > SEO & Search > Site Map
You see the existing site map menu item is declared by the node:

What two actions do you take to configure the new menu entry location? (Choose two.)

Question37: A merchant asks you to create a module that is able to process URLs with a custom structure that can contain any combination of a product type code, a partial name, and a 4-digit year in any order. The request path will look like this: /product/:type-code/:name-part/:year.
Which layer in the Magento request processing flow is suited for this kind of customization?

Question38: You need to control access to a custom controller action.
How do you tell Magento about this new control option?

Question39: What is the relationship between products and categories in Magento?

Question40: A merchant tasked you to add an input field for notes to the Customer Account Information backend page.
Which three actions do you specify in a module's Data Patch to add a customer notes attribute? (Choose three.)

Question41: You have created a module with a custom ACL resource and want to restrict access to resources of your module.
Which three items are restricted based on ACL role permissions? (Choose three.)

Question42: How do you instruct Magento to enable a new module?

Question43: You want to remove a column introduced by a third-party extension via declarative schema.
How do you do that?

Question44: You are building a new module to add extra functionality to the Magento application.
What files are required?

Question45: You are building CLI that use the console to create a customer account with our custom command, Adding a new command to CLI is based on passing on the argument from the XML level to the class.
Dependency Injection comes in handy here. you create the file app/code/Mycompany/Customer/etc/di.xml with the following content:
<type name="---------------------"> </type>
What is the correct in below?

Question46: A module MyModule needs to send notifications to customers only when the account was modified from a mobile app using the REST web APIs.
You decided to implement an observer for customer_save_after_data_object event.
In which file do you declare the observer?

Question47: You have configured an event observer to watch the checkout_submit_all_after event using this XML:

What is the required class definition for the event observer?